<ot-view>

    <div class="row" ng-hide="ontrackSVNIssueInfo">
        <div class="col-md-12 alert alert-warning">
            The revision information is loading. This may take some time...
        </div>
    </div>

    <div class="row" ng-show="ontrackSVNIssueInfo">
        <div class="col-md-12">

            <div class="panel panel-info">
                <div class="panel-heading">
                    <a href="{{ontrackSVNIssueInfo.issue.url}}">
                        {{ontrackSVNIssueInfo.issue.key}}
                    </a>
                </div>
                <div class="panel-body">
                    <ot-include value="ontrackSVNIssueInfo.issue"
                                template="extension/{{ontrackSVNIssueInfo.issueServiceConfigurationRepresentation.serviceId}}/issue.tpl.html">
                    </ot-include>
                </div>
            </div>

            <!-- For each revision info -->
            <div class="row" ng-repeat="ontrackSVNIssueRevisionInfo in ontrackSVNIssueInfo.revisionInfos">
                <div class="col-md-12">

                    <!-- Summary for the revision -->
                    <ot-extension-svn-revision-summary
                            revision-info="ontrackSVNIssueRevisionInfo.revisionInfo"
                            title="true"
                            >
                        <ot-extension-scm-issue-commit-branch-infos
                                infos="ontrackSVNIssueRevisionInfo.branchInfos"></ot-extension-scm-issue-commit-branch-infos>
                    </ot-extension-svn-revision-summary>

                </div>
            </div>

            <!-- All other revisions -->
            <div class="panel panel-default">
                <div class="panel-heading">
                    All revisions
                </div>
                <table class="table">
                    <thead>
                    <tr>
                        <th>Revision</th>
                        <th>Author</th>
                        <th>Date</th>
                        <th>Message</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="revisionInfo in ontrackSVNIssueInfo.revisions" ng-class="{'success': $first}">
                        <td>
                            <a href="{{revisionInfo.revisionUrl}}">{{revisionInfo.revision}}</a>
                            <a href="#/extension/svn/revision/{{ontrackSVNIssueInfo.configuration.name}}/{{revisionInfo.revision}}"
                               title="Displays release information about this revision">
                                <span class="fa fa-search"></span>
                            </a>
                        </td>
                        <td>
                            {{revisionInfo.author}}
                        </td>
                        <td>
                            {{revisionInfo.revisionDate | date:'mediumDate'}}
                        </td>
                        <td ng-bind-html="revisionInfo.formattedMessage"></td>
                    </tr>
                    </tbody>
                </table>
            </div>

        </div>
    </div>

</ot-view>